package com.example.springbootbabyu.entity;

import lombok.Data;

/**
 * 功能
 * 作者：梦天
 * 日期：2025/6/8 15:23
 * CREATE TABLE `sku` (
 *     `id` varchar(24) NOT NULL COMMENT 'SKU ID',
 *     `goods_id` varchar(24) NOT NULL COMMENT '商品ID',
 *     `specs` json DEFAULT NULL COMMENT '规格组合信息',
 *     `price` decimal(10, 2) NOT NULL COMMENT 'SKU价格',
 *     `old_price` decimal(10, 2) DEFAULT NULL COMMENT 'SKU原价',
 *     `stock` int NOT NULL COMMENT '库存数量',
 *     `discount` decimal(5, 2) DEFAULT NULL COMMENT '折扣率',
 *     `is_effective` tinyint(1) DEFAULT '1' COMMENT '是否有效',
 *     `picture` varchar(255) DEFAULT NULL COMMENT 'SKU图片',
 *     `now_price` int DEFAULT NULL,
 *     PRIMARY KEY (`id`),
 *     KEY `idx_goods` (`goods_id`),
 *     CONSTRAINT `sku_ibfk_1` FOREIGN KEY (`goods_id`) REFERENCES `goods` (`id`)
 * ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'SKU库存表'
 */
@Data
public class SkuDetail {
    private String id;
    private String goodsId;
    private String attrsText;
    private double price;
    private double oldPrice;
    private int stock;
    private double discount;
    private int isEffective;
    private String picture;
    private int nowPrice;
}
